im context simple: Protect shared data structures
authorMatthias Clasen <mclasen@redhat.com>
Mon, 18 Jan 2016 18:54:20 +0000 (13:54 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 18 Jan 2016 18:57:39 +0000 (13:57 -0500)
commitb3b048906c7378f104b8be4f4889a8e15025fcd1
tree639fd522f6dedade79603fa41846743118aa259a
parente150ea85bb548afdf5724beed6e262fd2d8fa7b3
im context simple: Protect shared data structures

Since a41f02f9b1843e0f0085f801430e55f413a9bf9c, GtkIMContextSimple
uses threads to load X Compose files. It does that every time a new
im context object is initialized, so we can easily end up with multiple
threads accessing the shared global_tables list at the same time.

Use a lock to prevent that.

https://bugzilla.redhat.com/show_bug.cgi?id=1276432
gtk/gtkimcontextsimple.c